from tkinter import*
x=int(input())
y=int(input())
n=int(input())
if x<0 or y<0 or (x+10)*n>500 or (y+30)*n>500:
    print("фигура не входит в поле")   
else:
    root=Tk()
    root.title("IT марафон")
    root.geometry("500x500")
    canvas=Canvas(bg="white", width=250, height=200)
    canvas.pack(anchor=CENTER, expand=1)
    if n<0 and x>20 and y>30:
        n=n*-1
        canvas.create_rectangle((x-10)*n, (y-30)*n, x, y, fill="red", outline="red")
        canvas.create_rectangle((x-20)*n, (y-20)*n, (x-10)*n, (y-10)*n, fill="red", outline="red")  
    else:
        canvas.create_rectangle(x, y, (x+10)*n, (y+30)*n, fill="red", outline="red")
        canvas.create_rectangle((x+10)*n, (y+10)*n, (x+20)*n, (y+20)*n, fill="red", outline="red")
root.mainloop()
